package exception;

import java.io.Serial;

/**
 * @author zhanglinfeng
 * @date create in 2024/5/23 11:47
 */
public class CodeException extends RuntimeException {
    @Serial
    private static final long serialVersionUID = 267906483866074311L;
    private String code;

    public CodeException() {
    }

    public CodeException(String code, String msg) {
        super(msg);
        this.code = code;
    }
    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String toString() {
        return this.getCode() + "~" + this.getMessage();
    }
}
